<html>
<#include "../include/comm_jlb_macro.ftl"/>
<@gmc_common_js "add" />
<head>
    <title>网站后台管理系统-${pageTitle!''}管理</title>
    <script type="text/javascript" src="/js/base.js"></script>
    <#include "../include/dropzone.ftl" />
    <@gmc_common_js "select" />
</head>
<body>
<div class="right">
    <div class="location">
        <div class="location01">您现在的位置是：首页 &gt; <strong class="m_title"></strong></div>
    </div>
    <div class="sort">
        <div class="sort1 m_title" ></div>
        <div class="query">
            <form id="queryForm" >
                <ul>
                    <li style="width:22%">
                        <span class="classify">群主：</span>
                        <input name="userName" type="text"   class="input"  id="userName" value="${userName!''}" placeholder="真实姓名或用户名"/>
                    </li>

                    <li style="width:22%">
                        <span class="classify">QQ群：</span>
                        <input name="qqName" type="text"   class="input"  id="qqName"  value="${qqName!''}" placeholder="群号或群名称"/>
                    </li>

                    <li style="width:15%">
                        <span class="classify">合作状态：</span>
                        <@selectGeneration name="category"  value="${category!''}" obj=BusinessQqGroupCooperationStatus.values() />
                    </li>
                    <li style="width:5%"><a href="javascript:void(0)">
                        <button type="button" class="btn btn-default" id="queryBtn" >查&nbsp;询</button>
                    </li>
                </ul>

            </form>
        </div>
    </div>
    <div class="form">
        <div class="form2">

            <table width="100%"  border="1" align="left" cellpadding="0" cellspacing="0" bordercolor="#ffffff" style="border-collapse:collapse">
                <tr class="lan">

                    <td height="37" align="center" valign="middle" background="/images/erji_22.jpg"><strong>商务谈判人</strong></td>
                    <td height="37" align="center" valign="middle" background="/images/erji_22.jpg"><strong>QQ群号</strong></td>
                    <td height="37" align="center" valign="middle" background="/images/erji_22.jpg"><strong>QQ群名称</strong></td>
                    <td height="37" align="center" valign="middle" background="/images/erji_22.jpg"><strong>微用户分配状态</strong></td>
                    <td height="37" align="center" valign="middle" background="/images/erji_22.jpg"><strong>群主合作状态</strong></td>
                    <td height="37" align="center" valign="middle" background="/images/erji_22.jpg"><strong>群主状态更新时间</strong></td>
                    <td height="37" align="center" valign="middle" background="/images/erji_22.jpg"><strong>操 作</strong></td>
                </tr>
                <#list pager.data as c>
                    <tr>
                        <td align="center" class="hui">
                            <#if c.realName?? && c.userName??>
                                ${c.realName!''}(${c.userName!''})
                                <#elseif c.realName?? >
                                    ${c.realName!''}
                                    <#elseif c.userName?? >
                                        ${c.userName!''}
                            </#if>

                        </td>
                        <td align="center" class="hui">${c.number!''}</td>
                        <td align="center" class="hui">${c.name!''}</td>
                        <td align="center" class="hui">
                            <#if c.assignmentStatus??>
                                ${AssignmentStatus.get(c.assignmentStatus).getTitle()}
                            </#if>
                        </td>
                        <td align="center" class="hui">
                            <#if c.leaderCooperationStatus??>
                            	${BusinessQqGroupCooperationStatus.get(c.leaderCooperationStatus).getTitle()}
                            </#if>
                        </td>

                        <td align="center" class="hui">
                            <#if c.updateTime??>
                                ${c.updateTime?string("yyyy-MM-dd")}
                            </#if>
                        </td>
                        <td align="center" class="hui" style="width:300px;"  >
                            <#if c.leaderCooperationStatus??>
                                <#if c.leaderCooperationStatus == 1>
                                	<#if subject.isPermitted("weiAccountQqGroupBusiness:saveAgree")>
     		 							<button type="button" class="btn btn-default" onclick="qqGroupBusiness.toAddAgreeInfo('${c.id}')">同意合作</button>
     								</#if>
     								
                                	<#if subject.isPermitted("weiAccountQqGroupBusiness:saveRefuse")>
                                		<button type="button" class="btn btn-default" onclick="qqGroupBusiness.toAddRefuseInfo('${c.id}')">拒绝合作</button>
     								</#if>
     								
     								<#if subject.isPermitted("weiAccountQqGroupBusiness:toView")>
	                                    	<button type="button" class="btn btn-default" onclick="qqGroupBusiness.toDetail('${c.id}')">详情</button>
	     								</#if>
	     								
                                    <#elseif c.leaderCooperationStatus == 2>
	                                    <#if subject.isPermitted("weiAccountQqGroupBusiness:toView")>
	                                    	<button type="button" class="btn btn-default" onclick="qqGroupBusiness.toDetail('${c.id}')">详情</button>
	     								</#if>
                                        
                                        <#elseif c.leaderCooperationStatus == 3>
	                                         <#if subject.isPermitted("weiAccountQqGroupBusiness:toView")>
	                                            <button type="button" class="btn btn-default" onclick="qqGroupBusiness.toDetail('${c.id}')">详情</button>
	                                         </#if>
                                            <#elseif c.leaderCooperationStatus == 4>
                                            <#if subject.isPermitted("weiAccountQqGroupBusiness:toView")>
                                                <button type="button" class="btn btn-default" onclick="qqGroupBusiness.toDetail('${c.id}')">详情</button>
                                            </#if>
                                </#if>

                            </#if>
                        </td>
                    </tr>
                </#list>
            </table>

        </div>
        <@pageBar   pager=pager url="/weiAccountQqGroupBusiness/list.action?jsonParam=${jsonParam!''}" join="&"> </@pageBar>
    </div>
</div>

<!-- 弹窗 结束 -->
<#include "../include/deleteConfirmModal.ftl" />
<script src="/js/qqGroupBusiness.js"></script>

<div>
    <form id="saveQqGroupBussinessForm" name="form"  method="post">
        <input type="hidden" id="id" name="id">
        <input type="hidden" name="leaderContent" id="leaderContent">
        <!-- 同意合作弹出层 -->
        <div id="qqGroupBussinessAgreeModal" class="pop_sure modal hide fade">
            <div class="picture-container">
                <!-- 图片上传 -->
                <div class="dropzone needsclick dz-clickable dz-started">

                </div>
            </div>
            <div class="caidan2">
            
                <button type="button" class="btn btn-default" onclick="qqGroupBusiness.movePicPosition(1);">前移</button>
                <button type="button" class="btn btn-default" onclick="qqGroupBusiness.movePicPosition(-1);">后移</button>
        
                <a href="#" id="saveAgreeBtn" ><img src="/images/bjwj03.jpg" width="62" height="23" /></a>&nbsp;
                <a href="#" id="cancelAgreeBtn" data-dismiss="modal"><img src="/images/bjwj_05.jpg" width="62" height="23" /></a>
            </div>
        </div>

        <!-- 拒绝合作弹出层 -->
        <div id="qqGroupBussinessRefuseModal" style="overflow: auto;" class="pop_sure modal hide fade">
            <div style="padding: 10px;">
                <span style="margin-left: 20px;"><span class="red">*</span>拒绝合作的原因是：</span><br/>
                <!-- <textarea style="width: 80%;height: 300px;margin-top: 25px;margin-left: 112px;" class="input validate[required,length[2000]" name="leaderCooperationFeedback" id="leaderCooperationFeedback"></textarea> -->
		   		<textarea  style="width:98%;margin-left: 17px;height: 310px;"  class="input validate[required,length[2000]" name="leaderCooperationFeedback" id="leaderCooperationFeedback"></textarea>
            </div>
            <div class="caidan2">
                <a href="#" id="saveRefuseBtn" ><img src="/images/bjwj03.jpg" width="62" height="23" /></a>&nbsp;
                <a href="#" id="cancelRefuseBtn" data-dismiss="modal"><img src="/images/bjwj_05.jpg" width="62" height="23" /></a>
            </div>
        </div>
    </form>
</div>

<!-- 文件拖拽控件 -->
<div id="preview-template" style="display: none;">
    <div class="dz-preview dz-file-preview" style="width:200px;height:200px;overflow: auto;">
        <div class="dz-image"><img data-dz-thumbnail="" /></div>
        <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress=""></span></div>
    </div>
</div>

<script>
    qqGroupBusiness.initPage();
    common.initLeftMenuSelected("weiAccountQqGroupBusiness_list");
</script>
<!-- 图片上传 -->
<style type="text/css">
    .dropzone { border: 2px dashed #0087F7; border-radius: 5px; background: white; }
    .dropzone .dz-message { font-weight: 400; }
    .dropzone .dz-message .note { font-size: 0.8em; font-weight: 200; display: block; margin-top: 1.4rem; }
    .dropzone {display: block; clear: both; height: 500px; width: 98%; margin-left: 9px;}
    .dropzone .dz-preview{float: left; margin-right: 10px;}
</style>
<script>
    //最后提交表单时，获取所有上传的图片列表
    function getAllFiles(){
        var files = myDropzone.getAcceptedFiles();
        var fileNames = new Array();
        for(var i=0,j=files.length; i<j; i++)
            fileNames.push(files[i].serverName);
        return fileNames;
    } 
</script>
<!-- /图片上传 -->

<style>
 .picUpload{border: 3px solid red;}
</style>
</body>
</html>

